package cn.bugstack.domain.activity.service.trail.thread;

import cn.bugstack.domain.activity.adapter.repository.IActivityRepository;
import cn.bugstack.domain.activity.model.valobj.SkuVO;

import java.util.concurrent.Callable;

/**
 * @Author caoyi
 * @description:
 * @Date 2025/7/30 17:56
 */
public class QuerySkuVOFromDBThreadTask implements Callable<SkuVO> {
    private final IActivityRepository repository;
    private final String goodsId;

    public QuerySkuVOFromDBThreadTask(IActivityRepository repository, String goodId) {
        this.repository = repository;
        this.goodsId = goodId;
    }

    @Override
    public SkuVO call() throws Exception {
        return repository.querySkuByGoodsId(goodsId);
    }
}
